package com.simplespringmvc.controller;

import com.simplespringmvc.mvc.annotation.*;
import com.simplespringmvc.service.UserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@MyController
public class UserController {

    @MyAutowired
    private UserService userService;


    @MyRequestMapping("testSpringMVC1")
    public String testSpringMVC1(@MyRquestParam("name") String name, HttpServletRequest  request, HttpServletResponse response,String age) {
        return userService.sayHellow(name) +" 我的年龄是 "+age;
    }

    @MyRequestMapping("test2")
    public String test2(){
        return "";
    }
}
